<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    </script>
    <script type="text/javascript">
        function f1(){
            alert("lalala");
        }
            $.ajax({
                type:"GET",
                dataType:"JSON",
                url:"/api/topic/get-all",
                success:function (data) {

                    alert(data.msg);

                },
                error:function () {
                    alert("异常");

                }
            })

    </script>
</head>
<body>

<button onclick="f1()" type="button">here</button>
</body>
</html>